home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Especial Multimedia
/
Especial Multimedia.iso
/
Multimed
/
Dibujo
/
RENDC102.ZIP
/
RDC.H_
/
RDC
Wrap
Text File
|
1996-05-12
|
17KB
|
422 lines
/*
* rdc.h - header file for RenderDotC
*
* RenderDotC (RDC) is:
* Copyright (c) 1996 by Dot C Software, Inc.
* All Rights Reserved.
*/
#ifndef RDC_H
#define RDC_H
#ifdef __cplusplus
extern "C" {
#endif
/*
* Definitions of Abstract Types used in RenderDotC Interface.
*/
typedef short RDCboolean;
typedef short RDCenum;
typedef long RDCint;
typedef unsigned short RDCquark;
typedef float RDCfloat;
typedef RDCfloat RDCpoint[3];
typedef RDCfloat RDCpointw[4];
typedef RDCfloat RDCcolor[3];
typedef RDCfloat RDCmatrix[4][4];
typedef RDCfloat RDCbasis[4][4];
typedef RDCfloat RDCbound[6];
typedef void RDCvoid;
typedef RDCvoid RDCobject;
typedef RDCvoid RDClight;
typedef RDCvoid (*RDCsubdivideFunc)(RDCvoid *, RDCfloat);
typedef RDCvoid (*RDCfreeFunc)(RDCvoid *);
typedef RDCvoid (*RDCerrorFunc)(RDCint, RDCint, const char *);
typedef RDCboolean (*RDCprogressFunc)(RDCint);
typedef RDCfloat (*RDCfilterFunc)(RDCfloat, RDCfloat, RDCfloat, RDCfloat);
/*
* Constants
*/
#define RDC_FALSE 0
#define RDC_TRUE 1
#define RDC_INFINITY 1.0e38
#define RDC_EPSILON 1.0e-10
#define RDC_NULL 0
/*
* Enumerators
*/
/* Masks */
#define RDC_ENUM_CLASS 0xff00
#define RDC_ENUM_SERIAL 0x00ff
/* Filters */
#define RDC_GAUSSIAN_FILTER 0x0100
#define RDC_CATMULLROM_FILTER 0x0101
#define RDC_BOX_FILTER 0x0102
#define RDC_TRIANGLE_FILTER 0x0103
#define RDC_SINC_FILTER 0x0104
/* File Formats */
#define RDC_BYTESTREAM 0x0200
#define RDC_TIFF 0x0201
/* Display Mode */
#define RDC_RGB 0x0301
#define RDC_A 0x0302
#define RDC_Z 0x0304
#define RDC_RGBA (RDC_RGB | RDC_A)
#define RDC_RGBZ (RDC_RGB | RDC_Z)
#define RDC_AZ (RDC_A | RDC_Z)
#define RDC_RGBAZ (RDC_RGBA | RDC_Z)
/* Hider Name */
#define RDC_ZBUFFER 0x0400
#define RDC_PAINT 0x0401
/* Shading Model */
#define RDC_FLAT 0x0500
#define RDC_GOURAUD 0x0501
/* Orientations */
#define RDC_LH 0x0600
#define RDC_RH 0x0601
#define RDC_INSIDE 0x0602
#define RDC_OUTSIDE 0x0603
#define RDC_REVERSE 0x0604
/* Patch Types */
#define RDC_BILINEAR 0x0700
#define RDC_BICUBIC 0x0701
/* Basis Applications */
#define RDC_UBASIS 0x0800
#define RDC_VBASIS 0x0801
#define RDC_UVBASIS 0x0802
/* Cubic Patch Basis */
#define RDC_BEZIER_BASIS 0x0900
#define RDC_BSPLINE_BASIS 0x0901
#define RDC_CATMULLROM_BASIS 0x0902
#define RDC_HERMITE_BASIS 0x0903
#define RDC_POWER_BASIS 0x0904
/* Patch Mesh Treatment */
#define RDC_WRAP 0x0a00
#define RDC_NOWRAP 0x0a01
/* Error Severity Levels */
#define RDC_INFO 0x0b01
#define RDC_WARNING 0x0b02
#define RDC_ERROR 0x0b04
#define RDC_SEVERE 0x0b08
#define RDC_IW (RDC_INFO | RDC_WARNING)
#define RDC_IE (RDC_INFO | RDC_ERROR)
#define RDC_IS (RDC_INFO | RDC_SEVERE)
#define RDC_WE (RDC_WARNING | RDC_ERROR)
#define RDC_WS (RDC_WARNING | RDC_SEVERE)
#define RDC_ES (RDC_ERROR | RDC_SEVERE)
#define RDC_IWE (RDC_IW | RDC_ERROR)
#define RDC_IWS (RDC_IW | RDC_SEVERE)
#define RDC_WES (RDC_WE | RDC_SEVERE)
#define RDC_IWES (RDC_IWE | RDC_SEVERE)
/* Error Handlers */
#define RDC_IGNORE 0x0c00
#define RDC_PRINT 0x0c01
#define RDC_ABORT 0x0c02
/* Variable classes */
#define RDC_NO_CLASS 0x0d00
#define RDC_CONST_CLASS 0x0d01
#define RDC_VARY_CLASS 0x0d02
#define RDC_VERTEX_CLASS 0x0d03
/* Variable types */
#define RDC_NO_TYPE 0x0e00
#define RDC_FLOAT_TYPE 0x0e01
#define RDC_INTEGER_TYPE 0x0e02
#define RDC_STRING_TYPE 0x0e03
#define RDC_PAIR_TYPE 0x0e04
#define RDC_POINT_TYPE 0x0e05
#define RDC_POINTW_TYPE 0x0e06
#define RDC_COLOR_TYPE 0x0e07
/*
* Predefined quarks
*/
/* Shading variables */
#define RDC_POINT ((RDCquark) 1)
#define RDC_POINTW ((RDCquark) 2)
#define RDC_HEIGHT ((RDCquark) 3)
#define RDC_NORMAL ((RDCquark) 4)
#define RDC_PLANE ((RDCquark) 5)
#define RDC_COLOR ((RDCquark) 6)
#define RDC_OPACITY ((RDCquark) 7)
/* Surfaces */
#define RDC_CONSTANT ((RDCquark) 8)
#define RDC_DIFFUSE ((RDCquark) 9)
#define RDC_METAL ((RDCquark) 10)
#define RDC_PLASTIC ((RDCquark) 11)
#define RDC_KA ((RDCquark) 12)
#define RDC_KD ((RDCquark) 13)
#define RDC_KS ((RDCquark) 14)
#define RDC_ROUGHNESS ((RDCquark) 15)
#define RDC_SPECULARCOLOR ((RDCquark) 16)
/* Lights */
#define RDC_AMBIENT ((RDCquark) 17)
#define RDC_OMNI ((RDCquark) 18)
#define RDC_DISTANT ((RDCquark) 19)
#define RDC_SPOT ((RDCquark) 20)
#define RDC_INTENSITY ((RDCquark) 21)
#define RDC_LIGHTCOLOR ((RDCquark) 22)
#define RDC_FROM ((RDCquark) 23)
#define RDC_TO ((RDCquark) 24)
#define RDC_CONEANGLE ((RDCquark) 25)
#define RDC_CONEDELTAANGLE ((RDCquark) 26)
#define RDC_BEAMDISTRIBUTION ((RDCquark) 27)
/* Atmospheres */
#define RDC_DEPTHCUE ((RDCquark) 28)
#define RDC_FOG ((RDCquark) 29)
#define RDC_HITHER ((RDCquark) 30)
#define RDC_YON ((RDCquark) 31)
#define RDC_BACKGROUND ((RDCquark) 32)
#define RDC_DISTANCE ((RDCquark) 33)
/* Coordinate Systems */
#define RDC_RASTER ((RDCquark) 34)
#define RDC_IMAGE ((RDCquark) 35)
#define RDC_EYE ((RDCquark) 36)
#define RDC_WORLD ((RDCquark) 37)
#define RDC_MODEL ((RDCquark) 38)
/*
* Declarations of All the RenderDotC Interface Subroutines
*/
extern RDCquark
rdcQuark(const char *string);
extern RDCvoid
rdcFrameBegin(void),
rdcFrameEnd(void),
rdcSceneBegin(void),
rdcSceneEnd(void);
extern RDCvoid
rdcRasterViewport(RDCint left, RDCint right, RDCint top, RDCint bot),
rdcRasterAspect(RDCfloat aspect),
rdcImageWindow(RDCfloat left, RDCfloat right, RDCfloat bot, RDCfloat top),
rdcImageAspect(RDCfloat aspect),
rdcImageCrop(RDCfloat xmin, RDCfloat xmax, RDCfloat ymin, RDCfloat ymax),
rdcViewOrthographic(void),
rdcViewPerspective(RDCfloat fov),
rdcViewIdentity(void),
rdcClip(RDCfloat hither, RDCfloat yon);
extern RDCvoid
rdcSampleAdaptive(RDCfloat variation),
rdcSampleUniform(RDCfloat xsamples, RDCfloat ysamples),
rdcSampleJitter(RDCfloat ampl),
rdcFilter(RDCenum filter),
rdcCustomFilter(RDCfilterFunc filterfunc),
rdcFilterWidth(RDCfloat xwidth, RDCfloat ywidth),
rdcColorGain(RDCfloat gain),
rdcColorGamma(RDCfloat gamma),
rdcColorQuantize(RDCint one, RDCint min, RDCint max),
rdcColorJitter(RDCfloat ampl),
rdcDepthQuantize(RDCint one, RDCint min, RDCint max),
rdcDepthJitter(RDCfloat ampl),
rdcOutputDisplay(const char *windowname),
rdcOutputFile(RDCenum format, const char *filename),
rdcOutputSamples(RDCenum samples);
extern RDCvoid
rdcHider(RDCenum type),
rdcColorSpace(RDCint n, const RDCfloat *nRGB, const RDCfloat *RGBn),
rdcTune(RDCint maxtess, RDCint xbucket, RDCint ybucket);
extern RDCvoid
rdcAttributePush(void),
rdcAttributePop(void),
rdcColor(const RDCfloat *color),
rdcOpacity(const RDCfloat *color);
extern RDClight
*rdcLightSource(RDCquark name, ...),
*rdcLightSourceV(RDCquark name,
RDCint n, const RDCquark *quarks, RDCvoid *const *parms);
extern RDCvoid
rdcLightSwitch(const RDClight *light, RDCboolean ononff),
rdcSurface(RDCquark name, ...),
rdcSurfaceV(RDCquark name,
RDCint n, const RDCquark *quarks, RDCvoid *const *parms),
rdcAtmosphere(RDCquark name, ...),
rdcAtmosphereV(RDCquark name,
RDCint n, const RDCquark *quarks, RDCvoid *const *parms),
rdcShadingRate(RDCfloat size),
rdcShadingModel(RDCenum type),
rdcMatteObject(RDCboolean onoff);
extern RDCvoid
rdcBound(const RDCfloat *bound),
rdcFlatness(RDCfloat value),
rdcOrientation(RDCenum orientation),
rdcBackface(RDCboolean onoff);
extern RDCvoid
rdcLoadIdentity(void),
rdcLoadMatrix(const RDCfloat matrix[4][4]),
rdcMultMatrix(const RDCfloat matrix[4][4]),
rdcPerspective(RDCfloat fov),
rdcTranslate(RDCfloat dx, RDCfloat dy, RDCfloat dz),
rdcRotate(RDCfloat angle, RDCfloat dx, RDCfloat dy, RDCfloat dz),
rdcScale(RDCfloat sx, RDCfloat sy, RDCfloat sz),
rdcSkew(RDCfloat angle, RDCfloat dx1, RDCfloat dy1, RDCfloat dz1,
RDCfloat dx2, RDCfloat dy2, RDCfloat dz2);
extern RDCvoid
rdcMarkSpace(RDCquark name);
extern RDCpoint
*rdcProjectPoints(RDCquark fromspace, RDCquark tospace,
RDCint n, RDCpoint *points);
extern RDCvoid
rdcMatrixPush(void),
rdcMatrixPop(void),
rdcObjectName(const char *name),
rdcGroupName(const char *name);
extern RDCvoid
rdcPolygon(RDCint nverts, ...),
rdcPolygonV(RDCint nverts,
RDCint n, const RDCquark *quarks, RDCvoid *const *parms),
rdcGeneralPolygon(RDCint nloops, const RDCint *nverts, ...),
rdcGeneralPolygonV(RDCint nloops, const RDCint *nverts,
RDCint n, const RDCquark *quarks, RDCvoid *const *parms),
rdcPolygonMesh(RDCint npolys, const RDCint *nverts, const RDCint *verts,
...),
rdcPolygonMeshV(RDCint npolys, const RDCint *nverts, const RDCint *verts,
RDCint n, const RDCquark *quarks, RDCvoid *const *parms),
rdcGeneralPolygonMesh(RDCint npolys, const RDCint *nloops,
const RDCint *nverts, const RDCint *verts, ...),
rdcGeneralPolygonMeshV(RDCint npolys, const RDCint *nloops,
const RDCint *nverts, const RDCint *verts,
RDCint n, const RDCquark *quarks, RDCvoid *const *parms),
rdcBasis(RDCenum which, RDCenum basis),
rdcCustomBasis(RDCenum which, const RDCfloat basis[4][4], RDCint step),
rdcPatch(RDCenum type, ...),
rdcPatchV(RDCenum type,
RDCint n, const RDCquark *quarks, RDCvoid *const *parms),
rdcPatchMesh(RDCenum type, RDCint nu, RDCenum uwrap,
RDCint nv, RDCenum vwrap, ...),
rdcPatchMeshV(RDCenum type, RDCint nu, RDCenum uwrap,
RDCint nv, RDCenum vwrap,
RDCint n, const RDCquark *quarks, RDCvoid *const *parms),
rdcNurb(RDCint uorder, const RDCfloat *uknot, RDCfloat umin,
RDCfloat umax, RDCint vorder, const RDCfloat *vknot,
RDCfloat vmin, RDCfloat vmax, ...),
rdcNurbV(RDCint uorder, const RDCfloat *uknot, RDCfloat umin,
RDCfloat umax, RDCint vorder, const RDCfloat *vknot,
RDCfloat vmin, RDCfloat vmax,
RDCint n, const RDCquark *quarks, RDCvoid *const *parms),
rdcNurbMesh(RDCint nu, RDCint uorder, const RDCfloat *uknot, RDCfloat umin,
RDCfloat umax, RDCint nv, RDCint vorder, const RDCfloat *vknot,
RDCfloat vmin, RDCfloat vmax, ...),
rdcNurbMeshV(RDCint nu, RDCint uorder, const RDCfloat *uknot, RDCfloat umin,
RDCfloat umax, RDCint nv, RDCint vorder, const RDCfloat *vknot,
RDCfloat vmin, RDCfloat vmax,
RDCint n, const RDCquark *quarks, RDCvoid *const *parms);
extern RDCvoid
rdcSphere(RDCfloat radius, RDCfloat zmin, RDCfloat zmax,
RDCfloat tmax, ...),
rdcSphereV(RDCfloat radius, RDCfloat zmin, RDCfloat zmax, RDCfloat tmax,
RDCint n, const RDCquark *quarks, RDCvoid *const *parms),
rdcCone(RDCfloat radius, RDCfloat height, RDCfloat zmax, RDCfloat tmax,
...),
rdcConeV(RDCfloat radius, RDCfloat height, RDCfloat zmax, RDCfloat tmax,
RDCint n, const RDCquark *quarks, RDCvoid *const *parms),
rdcCylinder(RDCfloat radius, RDCfloat zmin, RDCfloat zmax,
RDCfloat tmax, ...),
rdcCylinderV(RDCfloat radius, RDCfloat zmin, RDCfloat zmax, RDCfloat tmax,
RDCint n, const RDCquark *quarks, RDCvoid *const *parms),
rdcHyperboloid(const RDCfloat *point1, const RDCfloat *point2,
RDCfloat tmax, ...),
rdcHyperboloidV(const RDCfloat *point1, const RDCfloat *point2,
RDCfloat tmax, RDCint n, const RDCquark *quarks, RDCvoid *const *parms),
rdcParaboloid(RDCfloat rmax, RDCfloat zmin, RDCfloat zmax,
RDCfloat tmax, ...),
rdcParaboloidV(RDCfloat rmax, RDCfloat zmin, RDCfloat zmax, RDCfloat tmax,
RDCint n, const RDCquark *quarks, RDCvoid *const *parms),
rdcDisk(RDCfloat innerradius, RDCfloat outerradius,
RDCfloat tmax, ...),
rdcDiskV(RDCfloat innerradius, RDCfloat outerradius,
RDCfloat tmax,
RDCint n, const RDCquark *quarks, RDCvoid *const *parms),
rdcTorus(RDCfloat majrad, RDCfloat minrad,
RDCfloat phimin, RDCfloat phimax, RDCfloat tmax, ...),
rdcTorusV(RDCfloat majrad, RDCfloat minrad, RDCfloat phimin,
RDCfloat phimax, RDCfloat tmax,
RDCint n, const RDCquark *quarks, RDCvoid *const *parms),
rdcProcedural(RDCvoid *data, const RDCfloat *bound,
RDCsubdivideFunc subdivfunc, RDCfreeFunc freefunc);
extern RDCobject
*rdcObjectBegin(void);
extern RDCvoid
rdcObjectEnd(void),
rdcObjectCall(const RDCobject *handle);
extern RDCvoid
rdcErrorHandler(RDCenum severitymask, RDCenum handler),
rdcCustomErrorHandler(RDCenum severitymask, RDCerrorFunc handler);
extern RDCint
rdcLastError(void);
extern RDCvoid
rdcComment(const char *fmt, ...);
#ifdef __cplusplus
}
#endif
/* Cubic Patch Basis Steps */
#define RDC_BEZIER_STEP 3
#define RDC_BSPLINE_STEP 1
#define RDC_CATMULLROM_STEP 1
#define RDC_HERMITE_STEP 2
#define RDC_POWER_STEP 4
/* Error Codes */
#define RDC_NOERROR 0
#define RDC_NOMEM 1 /* Out of memory */
#define RDC_INCAPABLE 2 /* Unavailable Commercial RDC feature */
#define RDC_BUG 3 /* Probably a bug in renderer */
#define RDC_NESTING 4 /* Bad begin-end nesting */
#define RDC_NOTPARAMS 5 /* Invalid state for parameters */
#define RDC_NOTATTRIBS 6 /* Invalid state for attribs */
#define RDC_NOTPRIMS 7 /* Invalid state for primitives */
#define RDC_ILLSTATE 8 /* Other invalid state */
#define RDC_BADENUM 9 /* Invalid enumerator for request */
#define RDC_RANGE 10 /* Parameter out of range */
#define RDC_CONSISTENCY 11 /* Parameters inconsistent */
#define RDC_BADHANDLE 12 /* Bad object/light handle */
#define RDC_MISSINGDATA 13 /* Required parameters not provided */
#define RDC_SYNTAX 14 /* Declare type syntax error */
#define RDC_MATH 15 /* Zerodivide, noninvert matrix, etc. */
#endif